﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;

public partial class AdminCMS_tab_TagConfig_List : System.Web.UI.Page
{
    [RequestQuery.Query(QueryKey="keyword")]
    public string keyword = string.Empty;  //关键词
   
    protected void Page_Load(object sender, EventArgs e)
    {
        RequestQuery.SetQueryValues();

        if (!IsPostBack)
        {
            txt_keyword.Text = keyword;

            ProSplitPage1.DataSource = GetPagingData();  //给分页控件附值
            ProSplitPage1.AppendQuery = RequestQuery.GetQueryValues();
            repeater1.DataSource = ProSplitPage1.SplitSource(); //返回拆分结果
            repeater1.DataBind();
        }
    }

    #region 分页方法

    public DataSet GetPagingData()
    {
        StringBuilder sql = new StringBuilder();
        sql.Append(
@"SELECT tag_PubDate, tag_SourceID, tag_ID, tag_TagName
FROM [tab_TagConfig]");
        /* 追加条件*/
        //sql.Append(" WHERE 1 = 1");
        string Primary = "tag_ID"; //主键
        string Orderby = Primary + " DESC";  //排序
        return DataEntity.Common.ExecuteSplitPage(sql.ToString(), Primary, Orderby, ProSplitPage1.MaxRows, ProSplitPage1.PageIndex);
    }
    #endregion
}
